Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix generation when engines define data migrations path #225

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gustavodiel
Copy link
Contributor

@gustavodiel gustavodiel commented Sep 23, 2022

Hey there!

There is a bug when having multiple paths defined by engines:

Let's say we have some engines at the engines folder
If any engine add a data migration path, when generating a new data migration with rails g data_migration Something then it'll join all paths into a monstrosity like db/data/User/MyUser/path/to/project/engines/engineA/db/data/User/....

This PR adds a new config option which is pretty much similar to the old data_migrations_path, except that it is only for setting the generation folder, so while multiple engines might add migrations path, only one migration gen path will exist

Edit: No further action is required aside from setting the data migrations path. The migrations gen path will have a default value which will behave exactly like before.

@arielsilveira arielsilveira mentioned this pull request Sep 23, 2022
@ilyakatz ilyakatz requested a review from lewhit October 5, 2022 05:11
@ilyakatz
Copy link
Owner

ilyakatz commented Oct 5, 2022

Thanks for submitting the PR. Test seem to be failing, any ideas why?
Also, do you mind updating the docs so that other people know about this option.

@compwron
Copy link

This is probably affecting my team. I am commenting so I can keep track of this issue. We are cheering for you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants